/* test.scss */

// TABLE OF CONTENTS
// ==================================================
//
// LESS
// - Variables
// - Mixins
// Web Fonts
// - Google Web Fonts
// CSS
// - Helpers
// - Basic HTML
// - Headings
// - Body Copy Elements
// - Styles by ID tag
// - Styles by class tag
// - Image with captions
// - Menu
// - Blog.css
// - Pagination
// - Gallery
// - Debugging
// - Search
//   - Search form
//   - Search results
// - Code and Pre blocks

// Variables
// --------------------------------------------------
$white         : darken( white, 20% );
$black         : lighten( black, 20% );
$color1        : rgb(180,0,40);
$color2        : darken( $color1, 5% );
$color3        : saturate( adjust_hue( $color1, 90 ), 100%);
$font          : 16px;
$CopyColor     : $black;
$fontHeading   : Kreon, serif;
$fontCopy      : "Helvetica Neue", Helvetica, "Trebuchet MS", Arial, sans-serif;

// Mixins
// --------------------------------------------------
@mixin box-sizing( $p: 'border-box' ) {
  -moz-box-sizing: $p;
  -webkit-box-sizing: $p;
  box-sizing: $p;
}
$default-radius: 4px;
@mixin border-radius( $top:$default-radius, $right:$default-radius, $bottom:$default-radius, $left:$default-radius ) {
  -moz-border-radius: $top $right $bottom $left;
  -webkit-border-radius: $top $right $bottom $left;
  border-radius: $top $right $bottom $left;
}
@mixin box-shadow( $x: 0px, $y: 1px, $blur: 3px, $color: #000, $opacity: 0.7 ) {
  -moz-box-shadow: $x $y $blur fade_out( $color, $opacity );
  -webkti-box-shadow: $x $y $blur fade_out( $color, $opacity );
  box-shadow: $x $y $blur fade_out( $color, $opacity );
}
@mixin columns {
  .threecolumns {
    .column { float: left; width: 33%; }
  }

  .threecolumns,
  .fourcolumns {
    .last { float: right; }
    .last::after {
      content: '';
      clear: both;
    }
  }
}
@include columns;

// Functions
// --------------------------------------------------

// Google Web Fonts
// --------------------------------------------------
@import url(http://fonts.googleapis.com/css?family=Kreon);

* { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }

// Helpers
// --------------------------------------------------
.clear:after
{
  content: ".";
  display: block;
  height: 1px;
  line-height: 1px;
  visibility: hidden;
  clear: both;
}

img.alignright,
figure.alignright
{
  float: right;
  margin-left: $font;
  margin-bottom: $font;
}

img.alignleft,
figure.alignleft
{
  float: left;
  margin-right: $font;
  margin-bottom: $font;
}

.fancy-framework {
  color: $color1;
  font-weight: bold;
  font-style: italic;
}

// HTML Basic
// --------------------------------------------------
* {
  @include box-sizing( border-box );
}

html, body {
  height: 100%;
}

body {
  position: relative;
  margin: 0 auto;
  font-family: $fontCopy;
  color: $CopyColor;
  line-height: 1.68;
  padding-bottom: $font;
}

:focus {
  background-color: $color3;
  color: #FFFFFF !important;
  outline: none;
}

img#background {
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  min-height: 100%;
  min-width: 100%;
  z-index: -1;
}

ins {
  background-color: hsl( hue($color3), 100%, 75% );
}

a,
a:link,
a:active,
a:visited
{
  color: $color1;

  transition: color 0.25s ease-in;
  -o-transition: color 0.25s ease-in;
  -moz-transition: color 0.25s ease-in;
  -webkit-transition: color 0.25s ease-in;

  &:hover {
    color: lighten( $color1, 25 );
  }
}

aside {
  float: right;
  margin: 0 0 1em 1em;
  padding: .75em;
  width: 25%;
  border-style: solid;
  border-width: 0 0 0 1px;

  &.left {
    float: left;
    margin: 0 1em 1em 0;
    border-width: 0 1px 0 0;
  }
}

// Headings
// --------------------------------------------------
h1, h2, h3, h4, h5, h6
{
  font-family: $fontHeading;
  margin: 0.75em 0 0;
  line-height: 1.6;
}

h1
{
  font-size: $font * 2.75;
  font-weight: normal;
  color: $color1;
}
h2
{
  font-size: $font * 2.00;
  color: $color2;
}
h3
{
  font-size: $font * 1.75;
  color: darken( $color2, 10% );
}
h4
{
  font-size: $font * 1.50;
  color: darken( $color2, 20% );
}
h5
{
  font-size: $font * 1.25;
  color: darken( $color2, 20% );
}
h6
{
  font-size: $font * 1.00;
  color: darken( $color2, 20% );
}

// place this after the h# tags
hgroup 
{
  margin: 2em 0;
  * { margin: 0; }
}

// Body copy elements
// --------------------------------------------------
p,
dl,
li
{
  font-size: $font * 14/16;
}

li {
  * {
    // 2nd level elements are smaller
    font-size: $font * 12/16;
  }
}

dl {
  dt {
    font-weight: bold;
    margin-top: 0.5em;
  }

  dd {
  }
}

article {
  footer {
    font-size: $font * 0.75;
    color: lighten( $CopyColor, 30);
  }
}

// Styles by ID tags
// --------------------------------------------------
header#main
{
  margin-top: $font;
}

#identity
{
  margin: .25em 0 1em 0;
  float: left;

  h1
  {
    font-weight: bold;
  }
}

div#main {
  margin-top: 2em;
}

footer#footer
{
  border-top: 1px solid;
  margin-top: 2em;
  padding-top: 2em;

  p {
    font-size: $font  * .75;
  }
}

// Styles by class tag
// --------------------------------------------------
.content {
  max-width: 1100px;
  width: 90%;
  margin: auto;
  padding: 0 40px;
  overflow: auto;
}

// Image with captions
// --------------------------------------------------
div.image {
  background: $white;
  float: right;
  padding: 10px;
  margin: 0 0 20px 20px;
  font-size: 12px;
  @include border-radius( 10px, 10px, 4px, 4px );
  @include box-shadow();

  &.alignright { float: right; margin: 0 0 20px 20px; }
  &.alignleft { float: left; margin: 0 20px 20px 0; }

  &.thumb { padding: 2px; }

  img {
    display: block;
    margin-bottom: 10px;
    @include border-radius();
  }
  p.caption {
    font-size: inherit;
    padding: 0;
    margin: 10px 0 5px;
  }
}

// MENU
// <nav class="menu"><ul><li><a></a></li></ul></nav>
// --------------------------------------------------
nav#main.menu {
  float: left;
  margin: 0 0 0 1em;

  ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  a, a:link, a:active, a:visited {
    text-decoration: none;
  }

  li {
    float: left;
    margin: 0 4px;
  }

  li a:first-child {
    float: left;
    height: inherit;
    font-size: 24px;
    padding: 0 16px;
  }

  ul.children {

    li {
      float: none;

      a {
        font-size: 12px;
        height: auto;
      }
    }
  }
}

footer nav.menu
{
  a,
  a:link,
  a:active,
  a:visited
  {
    text-decoration: none;
  }

  ul {
    height: auto;

    li {
      display: block;
      padding: .125em 0;
      font-size: $font * 0.75;
      font-family: $fontCopy;
      line-height: inherit;
      border-right: 0 none;

      a {
        color: $color2;
      }

      &:hover {
        a {
          color: darken( $color2, 20% );
        }

        ul {
            display: none;
        }
      }

      ul {
        display: none;
      }

    }
  }
}

// .orbit-wrapper holds the Orbit slider
// it needs some space for the bullets below the slider which overlap the following content
.orbit-wrapper
{
  margin: 20px 10px 40px;
  @include box-shadow();

  div.orbit
  {
    width: 960px;
    height: 450px;
    background: #000 url('../plugins/orbit/orbit/loading.gif') no-repeat 50% 50%;
    overflow: hidden;

    img, div { display: none; }
  }
}

// Blog.css
// Styles for the blog controller
// --------------------------------------------------

section#blog article {
  padding-left: 60px;
  margin: .5em 0;
  border-bottom: 1px solid;
  position: relative;
  overflow: hidden;

  footer {
    float: left;
    width: 60px;
    margin: .25em 0 .125em -60px;
    text-align: center;
    font-size: 10px;
    line-height: 1.125;
    color: rgb(50,50,50);
    text-shadow: rgb(0,0,0) 0px 1px 3px;
    text-shadow: rgba(0,0,0,.5) 0px 1px 3px;

    time.day {
      font-weight: bold;
      font-size: 14px;
    }
  }

  h1 {
    margin: 0;
    font-size: 30px;
  }

  p {
    font-size: 12px;
    margin: 0 0 .5em 0;
  }

  a {
    text-decoration: none;
    color: rgb(180,0,40);
    transition-property: color;
    transition-duration: .5s;
    transition-delay: .5s;
    transition-timing-function: ease-out;
  }

  a:hover {
    color: rgb(250,50,50);
  }
}


// Pagination
// --------------------------------------------------
.pagination {
  a, span {
    margin: 0em .5em;
    padding: 0em .5em;
    font-size: 12px;
    float: left;
    display: block;
    text-decoration: none;
    background-color: rgba(255,255,255,.5);
    @include border-radius();
    @include box-shadow();
  }
  span {
    color: lighten( $black, 30 );
  }
  a:hover {
    background-color: rgba(255,255,255,1);
  }
  a.first,
  a.last {
    display: none;
  }
  a.prev {}
  a.next {}
  a.page {
    width: 1.25em;
    text-align: center;
  }
  a.current {
    color: $black;
  }
}

// Gallery
// --------------------------------------------------
.gallery {
  .frame {
    width: 200px;
    height: 200px;
    overflow: hidden;

    a {
      display: block;
      overflow: hidden;
    }
    .image {
      display: block;
      width: 200px;
      height: 200px;
      background-size: cover;
      background-position: 50% 50%;
    }
  }
}

// Debugging
// --------------------------------------------------
#debugging {
  position: fixed;
  bottom: 0;
  left: 0;
  display: block;
  width: 100%;
  padding: 16px;
  
  h1 {
    font-size: 14px;
    color: rgb(255,255,255);
    text-shadow: none;
    background-color: rgb(0,0,0);
    display: inline;
    padding: 8px;
    margin: 0;
  }
  
  #debug-content {
    display: none;
    width: 90%;
    background: rgb( 0,0,0 );
    color: rgb(255,255,255);
    margin: 0;
    padding: 1em 1em 1em 2em;

    li {
      font-size: 10px;
    }
  }
}

// Search
// ==================================================
//
// - Search Form
// --------------------------------------------------
form#search {
  width: 90%;
  margin: 16px auto;
  text-align: center;

  input {
    line-height: 1.125;
    font-size: 16px;
    padding: 8px 16px;
    outline: none;
    border: 1px solid rgb(120,120,120);
    background-color: fade_out( $white, 0.50);
    border-color: transparent;
    @include border-radius( 5px, 5px, 5px, 5px);
    @include box-shadow( 0px, -1px, 3px, #000, 0.6);
  }

  input.searchbox {
    width: 50%;
    margin: 0 auto;
  }

  input.submitbutton {
    background-image: url('http://cdn2.iconfinder.com/data/icons/ecqlipse2/SEARCH.png');
    background-size: contain;
    background-repeat: none;
    font-size: 1px;
    text-indent: 0;
    height: 35px;
    width: 35px;
    overflow: hidden;
    line-height: 30px;
  }
}

// - Search results
// --------------------------------------------------
#searchresults {
  ol {
    li {
      p {
        margin: 0;
      }
      .title {
        font-size: 20px;
      }
      .url {
        color: $color2;
      }
      .excerpt {
      }
      .score {
        font-size: 12px;
        font-weight: 100;
      }
      ins {
      }
    }
  }
}


// Code & Pre blocks
// --------------------------------------------------
code, pre {
  font-size: $font * 12/16;
  background-color: $white;
  border: 1px solid rgb(180,180,180);
  padding: $font;
}

pre {
  margin: $font;
  overflow: hidden;
}
